package GameCode;

import GameCode.ConcreteState.FinalPlayerState;
import GameCode.ConcreteState.PrimaryPlayerState;
import GameCode.ConcreteState.ProfessionalPlayerState;
import GameCode.ConcreteState.SecondaryPlayerState;

public class PlayerContext {
    private PlayerState currentState;

    public PlayerContext() {
        //初始状态为入门级
        this.currentState = new PrimaryPlayerState();
    }

    public void setCurrentState(PlayerState state) {
        this.currentState = state;
    }

    public void play() {
        currentState.play(this);
    }

    public void doubleScore() {
        currentState.doubleScore(this);
    }

    public void changeCards() {
        currentState.changeCards(this);
    }

    public void peekCards() {
        currentState.peekCards(this);
    }

}
